﻿CREATE TABLE [dbo].[CallCenter_Record] (
    [Id]           INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [GId]          UNIQUEIDENTIFIER CONSTRAINT [DF_CallCenter_Record_GId] DEFAULT (newid()) ROWGUIDCOL NULL,
    [ZuoxiID]      INT              NULL,
    [Type]         NVARCHAR (50)    NULL,
    [Tel]          NVARCHAR (50)    NULL,
    [StartDate]    DATETIME         NULL,
    [EndDate]      DATETIME         NULL,
    [TxtFileName]  NVARCHAR (50)    NULL,
    [FileName]     NVARCHAR (50)    NULL,
    [CreateDate]   DATETIME         NULL,
    [CompanyId]    INT              CONSTRAINT [DF_CallCenter_Record_CompanyId] DEFAULT ((0)) NULL,
    [DepartmentId] INT              CONSTRAINT [DF_CallCenter_Record_DepartmnetId] DEFAULT ((-1)) NULL,
    [UserName]     NVARCHAR (50)    NULL,
    [EName]        NVARCHAR (50)    NULL,
    CONSTRAINT [PK_CallCenter_Record] PRIMARY KEY CLUSTERED ([Id] ASC) WITH (FILLFACTOR = 90)
);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_CompanyId]
    ON [dbo].[CallCenter_Record]([CompanyId] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_DepartmentId]
    ON [dbo].[CallCenter_Record]([DepartmentId] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_ZuoxiID]
    ON [dbo].[CallCenter_Record]([ZuoxiID] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_EndDate]
    ON [dbo].[CallCenter_Record]([EndDate] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_UserName]
    ON [dbo].[CallCenter_Record]([UserName] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [IX_CallCenter_Record_FileName]
    ON [dbo].[CallCenter_Record]([FileName] ASC) WITH (FILLFACTOR = 90);


GO
CREATE NONCLUSTERED INDEX [EFS_IX_CallCenter_Record_c97554cbfac54f52b615210550b3b01b]
    ON [dbo].[CallCenter_Record]([TxtFileName] ASC, [CompanyId] ASC)
    INCLUDE([EndDate]) WITH (FILLFACTOR = 90);

